﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Forms;

namespace BDSim
{
    /// <summary>
    /// StartWizardWnd.xaml 的交互逻辑
    /// </summary>
    public partial class StartWizardWnd : Window
    {
        public StartWizardWnd()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 用户选择功能对应的序号，1代表新建场景，2代表打开已有场景，3代表打开教学案例，4代表退出BDSim
        /// </summary>
        public int UserSelectIndex = 0;

        /// <summary>
        /// 返回新建场景标识，并关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            UserSelectIndex = 1;
            this.DialogResult = true;
        }

        /// <summary>
        /// 返回打开场景标识，并关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            UserSelectIndex = 2;
            this.DialogResult = true;
        }

        /// <summary>
        /// 返回打开教学案例标识，并关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button3_Click(object sender, RoutedEventArgs e)
        {
            UserSelectIndex = 3;
            this.DialogResult = true;
        }

        /// <summary>
        /// 返回退出BDSim系统标识，并关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            UserSelectIndex = 4;
            this.DialogResult = true;
        }

        /// <summary>
        /// 选择是否在下次显示启动向导
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void checkBox1_IsChecked(object sender, RoutedEventArgs e)
        {
            //Properties.Settings.Default.IsShowStartWizard = !(bool)((System.Windows.Controls.CheckBox)sender).IsChecked;
            //Properties.Settings.Default.Save();
        }
    }
}
